home *** CD-ROM | disk | FTP | other *** search
- Path: oxy.rust.net!usenet
- From: ebennett@rust.net
- Newsgroups: comp.lang.c++
- Subject: Re: Help on C++ error
- Date: Thu, 11 Jan 1996 05:15:47 GMT
- Organization: Rust Net - High Speed Internet in Detroit 810-642-2276
- Message-ID: <4d1rqc$sla@oxy.rust.net>
- References: <96010.112507APCCU@CUNYVM.CUNY.EDU>
- NNTP-Posting-Host: liv-16.rust.net
- X-Newsreader: Forte Free Agent 1.0.82
-
- Paul Abrilla <APCCU@CUNYVM.CUNY.EDU> wrote:
-
- >Hi to all,
- >
- >I'm just starting to code on C++, and was playing around with classes and
- >came across an error and a warning when I try to compile the code below.
- >The warning is complaining about the statement, 'int Cat::SetAge(age)'.
- >It says, 'Style of function definition is now obsolete'. I'm sorry I couldn't
- >check my compiler's manual at this time. On the other hand, the error says,
- >'Cat::SetAge(int)' is not a member of 'Cat' (line:19). Any help will be
- >appreciated. Please send replies directly tp my account. Thanks in advance.
- >
- > Stuff Deleted....
- >
- >int Cat::SetAge(age)
- >{
- > itsAge = age;
- >}
-
- Change this to:
-
- int Cat::SetAge(int age)
- {
- itsAge = age;
- }
-
- The style of declaring a parameter without its type is obsolete.
-
- Earl Bennett
-
-
-